package com.example.powerimageview;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        View decorView = getWindow().getDecorView();
        // Hide both the navigation bar and the status bar.
        // SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
        // a general rule, you should design your app to hide the status bar whenever you
        // hide the navigation bar.
        int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE;
//        decorView.setSystemUiVisibility(uiOptions);

//        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.activity_main);
//        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.activity_main);


        SystemBarConfig systemBarConfig = new SystemBarConfig(MainActivity.this);
        int navigationBarWidth = systemBarConfig.getNavigationBarWidth();
        System.out.println("navigationBarWidth = " + navigationBarWidth);
        int statusBarHeight = systemBarConfig.getStatusBarHeight();
        int navigationBarHeight = systemBarConfig.getNavigationBarHeight();
        int contentHeight = systemBarConfig.getContentHeight();
        int actionBarHeight = systemBarConfig.getActionBarHeight();
        String navBarOverride = systemBarConfig.getNavBarOverride();
        System.out.println("statusBarHeight = " + statusBarHeight);
        System.out.println("navBarOverride = " + navBarOverride);
        System.out.println("navigationBarHeight = " + navigationBarHeight);
        System.out.println("contentHeight = " + contentHeight);
        System.out.println("actionBarHeight = " + actionBarHeight);
    }
}
